package org.atlantis.grosbeak.depot.proxy.value;

import org.atlantis.grosbeak.depot.DepotMaker;
import org.atlantis.grosbeak.depot.proxy.ValueProxy;
import org.atlantis.grosbeak.lang.Files;

/**
 * 文件值代理。在配置文件中的格式应该是：“file : 'c:/a.txt'”，那么获得的是一个File("c:/a.txt")文件对象。
 * 
 * @author <a href="mailto:seenoevil.cn@gmail.com">SeeNoEvil</a>
 * 
 */
public class FileValueProxy implements ValueProxy {

	private String path;

	public FileValueProxy(String path) {
		this.path = path;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.atlantis.grosbeak.depot.proxy.ValueProxy#get(org.atlantis.grosbeak
	 * .depot.DepotMaker)
	 */
	public Object get(DepotMaker maker) {
		return Files.find(path);
	}
}
